home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / prcmfixs.arc / PRM24PAT.ARC / PRM242.PAT
Text File  |  1986-12-30  |  2KB  |  47 lines

  1. Article 138 of comp.sys.ibm.pc:
  2. Path: zen!ucbcad!ames!sri-spam!rutgers!husc6!panda!enmasse!drilex!axiom!linus!gwr
  3. From: gwr@linus.UUCP (Gordon W. Ross)
  4. Newsgroups: comp.sys.ibm.pc
  5. Subject: PROCOMM with DOS 3.2 (patch)
  6. Message-ID: <11@linus.UUCP>
  7. Date: 18 Nov 86 15:48:39 GMT
  8. Reply-To: gwr@linus.UUCP (Gordon W. Ross)
  9. Distribution: world
  10. Organization: The Mitre Corporation
  11. Lines: 40
  12.  
  13.  
  14.     The following is a patch which will make PROCOMM 2.42  
  15. (from Datastorm Technologies, Inc.) behave with DOS 3.2.
  16.  
  17.     When running with DOS 3.2, CTRL-BREAK causes PROCOMM to
  18. hang the system, with last words "Stack Overflow."  
  19.  
  20.     Since the problem only appears with DOS 3.2, I suspected that
  21. the stack swapping implemented in DOS 3.2 might be the cause.  Using a
  22. resident debugger, I captured the keyboard break interrupt, and
  23. discovered a problem with its interrupt handler.
  24.     Upon entry to the keyboard break interrupt handler, the stack
  25. is checked for overflow by comparing the the stack pointer with both
  26. upper and lower limits.  The limits used assume that PROCOMM's stack
  27. is the current stack, and fail because DOS has substituted a new stack
  28. in response to the hardware interrupt from the  keyboard.  The DOS
  29. stack has plenty of room, but fails the limit check because it is a
  30. DOS sized stack and not PROCOMM's own stack.
  31.     The stack overflow error routine is responsible for actually
  32. hanging the system, but it is easiest to disable the stack checking
  33. in the interrupt handler so it won't enter the error routine.  Also,
  34. it is sufficient to remove only the high limit check because the low
  35. limit is always zero.  (If the SP gets to zero, the system is proably
  36. dead anyway.)  I disabled the high limit check with a one byte patch:
  37.  
  38.   rename procomm.exe procomm.bin
  39.   debug procomm.bin
  40.   e 8686 0
  41.   w
  42.   q
  43.   rename procomm.bin procomm.exe
  44.  
  45.     The above turns a JMP STACK_OVERFLOW_ERROR (or whatever) into
  46. a JMP $+2, which happens to be the succesful exit code.
  47. There is no reason to apply this patch if you use DOS 3.